<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: {{ name }}</div>
    <!--组件 -->
    <Page-tools :show-before="true">
      <span slot="before">我想你们</span>
      <el-button slot="after" type="primary">导入excel</el-button>
    </Page-tools>
    <!-- 插槽的两种写法 slot v-slot -->
    <Page-tools :show-before="true">
      <template v-slot:before>
        <span>我想你们</span>
      </template>

      <template v-slot:after>
        <el-button type="primary">导入excel</el-button>
      </template>
    </Page-tools>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
// import PageTools from "../../components/PageTools";
export default {
  name: "Dashboard",
  components: {
    // 注册组件
    // PageTools,
  },

  computed: {
    ...mapGetters(["name"]),
  },
};
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
